package ly.gupao.edu.designPattern.factory.fac.abstruct;

import ly.gupao.edu.designPattern.factory.entity.Developer;
import ly.gupao.edu.designPattern.factory.entity.Fronter;
import ly.gupao.edu.designPattern.factory.entity.Javaer;
import ly.gupao.edu.designPattern.factory.entity.Phper;


/**
 * 编写工厂类，工厂类集成抽象类，实现抽象类中的方法
 */
public class Factory extends AbstractFactory {

    @Override
    Developer getJavaer() {
        System.out.println("i'm a javaer");
        return new Javaer();
    }


    @Override
    Developer getPhper() {
        System.out.println("i'm a phper");
        return new Phper();
    }

    @Override
    Developer getFronter() {
        System.out.println("i'm a fronter");
        return new Fronter();
    }
}
